package fpzhan.plane.program.describe;

import fpzhan.plane.program.connect.ChainCodeBlockConnect;

import java.util.function.Consumer;

public class RepeatComment {

    private ChainCodeBlockConnect connect;

    private Consumer<String> consumer;

    public RepeatComment(ChainCodeBlockConnect connect,Consumer<String> consumer) {
        this.connect = connect;
        this.consumer=consumer;
    }

    public ChainCodeBlockConnect comment(String comment){
        consumer.accept(comment);
        return this.connect;
    }
}
